package org.idea.spring.bean.listener;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author linhao
 * @date created in 8:56 下午 2020/10/11
 */
public class MyApplicationContext extends AnnotationConfigApplicationContext {

    @Override
    protected void initPropertySources() {
        //如果启动的时候没有标注相关参数就需要抛出异常
        getEnvironment().setRequiredProperties("tuling");
    }

    public MyApplicationContext(Class<?> clazz){
        super(clazz);
    }
}
